<div>
  <form ng-submit="submitAnswer(answer)">
    <input type="number" ng-model="answer" step="any" required autofocus
           ng-focus="this.select()"
           oninvalid="setCustomValidity('Please enter a number.')"
           onchange="try{setCustomValidity('')}catch(e){}">
    <button type="submit">Submit</button>
  </form>
</div>
